<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>undefined来清空对象</title>
</head>

<body>
    <p>对象可以设置为 <b>undefined</b> 来清空。</p>
    <p id="demo"></p>
    <script>
        var person = {firstName:"perter", lastName:"fucekr", age: 1, eyeColor: "pinck"};
        var person = undefined;
        document.getElementById("demo").innerHTML = typeof person;
    </script>
</body>

</html>